package sueldos;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;



public class Tester {

	/**
	 * @param args
	 * @throws ParseException 
	 */
	public static void main(String[] args) {
		
		Empresa emp = new Empresa(2, "juancruce", "20-25454431-1", "pampa", "santa cruz", "cl", "la linda", "villegas");
		emp.toDatabase();
		
		/*
		try {
			Connection conexion = DriverManager.getConnection("jdbc:mysql://localhost:3306/addisyc", "", ""); 
			String query="SELECT DISTINCT codigo, nombre, cuit FROM proveedo";
			PreparedStatement ps = conexion.prepareStatement(query);
			ps.execute();
			
			ResultSet rs = ps.getResultSet();
			for (int i = 1; i < rs.getMetaData().getColumnCount()+1; i++) {
				System.out.println(rs.getMetaData().getColumnLabel(i).toUpperCase());
				
			}
			

		} catch (Exception e) {
			e.printStackTrace();
		}
		//System.out.println(new Empresa().idEmpresa("aztiria"));*/
		
		/*
		try {
			new ReportDriver().runReport("aztiria", "E:/codigoJava/reportes/MyReports/ListaSueldos.jrxml", "2014/03/02", "Elsa Clara Aztiria");
			
		} catch (Exception e) {
			e.printStackTrace();
		}*/
		
		//new SeguroVida().altaSeguro("clavier", "160", 1);
		/*
			try {
				 String userName = "";
		         String password = "24909558leandro25086";
		         String url = "jdbc:odbc:baseUatre";
		         Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
		         Connection conn = DriverManager.getConnection (url, userName, password);
		         String sql = "select  * from view_trabajador";
				 
		         //cuit, cuil, ApellidoNombres as nombre
				 PreparedStatement rs = conn.prepareStatement(sql);
		        
				 rs.execute();		
				 int i=1;
				 while (rs.getResultSet().next()){
					 System.out.println(rs.getResultSet().getMetaData().getColumnName(i));
					 System.out.println(rs.getResultSet().getMetaData().getColumnTypeName(i));
					// System.out.println(rs.getResultSet().getString(1)+" - "+rs.getResultSet().getString(2)+" - "+rs.getResultSet().getString(3));
					 i++;
		         }
				 
				rs.close();
				conn.close();
			}catch(Exception e){
				e.printStackTrace();
			}
		}
		
		*/
	}

}